package com.yang.xiao.hui.filter;

import javax.servlet.*;
import java.io.IOException;

public class OrderFitler implements Filter {

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
      /*  String name = request.getParameter("name");
        if("yangxiaohui".equals(name)){
            chain.doFilter(request,response);
        }*/
        response.setContentType("text/html;charset=UTF-8");
       // response.getWriter().print("用户名称不正确");
        chain.doFilter(request,response);
    }

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        System.out.println("OrderFitler。。。初始化了");
    }

    @Override
    public void destroy() {

    }
}
